import 'dart:convert';
import 'dart:io';

import 'package:cjybase/widget/cjy_listview.dart';
import 'package:cjybase_example/page/list/list_page_state.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class ListPageView extends ListPageState {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(
          "列表案例",
        ),
      ),
      body: CjyListView(
        itemView: (context, index, itemData) =>
            itemView(context, index, itemData),
        onRefresh: () => onRefresh(),
        onLoading: () => onLoading(),
        cjyController: cjyController,
      ),
    );
  }

  Widget itemView(BuildContext context, int index, String itemData) {
    return Container(
      height: 50,
      child: Text(itemData),
    );
  }
}
